package com.geese.module.admin.controller;

import com.geese.common.BaseController;
import com.geese.common.vo.Page;
import com.geese.module.admin.service.IOrderAdminService;
import com.geese.module.admin.vo.OrderVO;
import com.geese.module.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * Created by huweiwei on 2017/3/28.
 */
@RestController
@RequestMapping("/admin/order")
public class OrderAdminController extends BaseController {

    @Autowired
    private IOrderAdminService orderAdminService;
    @Autowired
    private UserService userService;


    @RequestMapping("/list")
    public String list(@RequestParam String token, OrderVO orderVO) {
//        userService.checkUser(token);
        Page page = getPageInfo(orderVO);
        Map<String, Object> data = orderAdminService.getList(page, orderVO);
        return response(data);
    }


}
